﻿<%@ Page Language="VB" ContentType="image/gif" %>
<%@ Import Namespace = "System.Drawing" %>
<%@ Import Namespace = "System.Drawing.Imaging" %>

<script runat="server">
    ''' <summary>
    ''' Sample 1 (VB example)
    ''' Generate a GIF image with a red line diagonally across
    ''' </summary>
    ''' <remarks></remarks>
    Sub Page_Load()
        
        Dim objBitmap As Bitmap
        Dim objGraphics As Graphics

        objBitmap = New Bitmap(200, 200)
        objGraphics = Graphics.FromImage(objBitmap)

        objGraphics.DrawLine(New Pen(Color.Red), 0, 0, 200, 200)

        objBitmap.Save(Response.OutputStream, ImageFormat.Gif)

        objBitmap.Dispose()
        objGraphics.Dispose()
        
    End Sub
</script>